#ifndef __SPI_H
#define __SPI_H

#include "stm32f10x.h"

#define  ENC28J60_CSL()    (GPIOA->ODR &= ~(1<<4))//(GPIOB->ODR &= ~(1<<12))
#define  ENC28J60_CSH()    (GPIOA->ODR |= 1<<4)//(GPIOB->ODR |= 1<<12)

#define   ENC28J60_RSTL()  // (GPIOE->ODR &= ~(1<<1))
#define   ENC28J60_RSTH()  // (GPIOE->ODR |= 1<<1)

#define  ENC_SPI_ReadWrite  SPI1_ReadWrite
#define  ENC_SPI_Init  SPI1_Init

void SPI2_Init(void);
void SPI1_Init(void);
uint8_t SPI2_ReadWrite(uint8_t writedat);
uint8_t SPI1_ReadWrite(uint8_t writedat);
   

#endif
